home *** CD-ROM | disk | FTP | other *** search
- Path: nntp-server.caltech.edu!news
- From: "Matthew A. Clapp" <mclapp@thunder.caltech.edu>
- Newsgroups: comp.lang.c++
- Subject: newbie troubles with g++
- Date: 2 Jan 1996 22:22:23 GMT
- Organization: California Institute of Technology, Pasadena
- Message-ID: <4ccb6v$ppk@gap.cco.caltech.edu>
- NNTP-Posting-Host: thunder.caltech.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; Linux 1.2.8 i486)
- X-URL: news:comp.lang.c++
-
- Hi all,
-
- I'm new to C++, but managed to hack some simple programs at home
- using Borland Turbo C++. When I try to compile these again using g++, it
- just spews at me. Even the simplest program I tried:
-
- ------------------------------
- #include<iostream.h>
-
- main()
- {
- cout << "hello world";
- return 0;
- }
- -------------------------------
-
- gives me the following errors:
-
- -------------------------------------------------------
- /usr/include/g++/streambuf.h: In method `long int
- streambuf::pubseekoff(long int, enum ios::seek_dir, int = 3)':
- In file included from /usr/include/g++/iostream.h:31,
- from llist.cc:7:
- /usr/include/g++/streambuf.h:351: warning: implicit declaration of
- function `int _IO_seekoff(...)'
- /usr/include/g++/streambuf.h: In method `long int
- streambuf::pubseekpos(long int, int = 3)':
- /usr/include/g++/streambuf.h:353: warning: implicit declaration of
- function `int _IO_seekpos(...)'
- ---------------------------------------------------
-
- It creates an executable that gives a segmentation fault when run.
- I use 'g++ foo.cc -o foo' to compile.
-
- I assume there's something wrong with my g++ setup. Anyone know what
- it might be? BTW I'm using Linux 1.2.8 and gcc v2.7.0.
-
- Thanks in advance!
- Matt
-
-